const db = uniCloud.database();
module.exports = async function(options = {}) {
	const { characterId, name, chapterDesc, logo } = options;
	const token = this.getUniIdToken();
	if (!token || !characterId || !name) {
		throw new Error('非法操作');
	}
	const params = {
		name,
		chapterDesc,
		logo
	}
	await db.collection('a-dz-chapter-list-custom').where({ characterId }).update(params);
	return {
		code: 0,
		data: params,
		msg: '修改成功'
	}
}